//统一身份项目用户相关的接口
import request from '@/utils/request'
import type {loginFormData,loginResponseData} from '@/api/user/type.ts'
//项目用户相关的请求的地址
enum API {
  LOGIN_URL = '/api/index/user/login',
  USERINFO_URL = '/api/index/user/info1',
  LOGOUT_URL = '/api/index/user/loginout',

}

//登录接口
export const reqLogin = (data: loginFormData) => request.post<any, loginResponseData>(API.LOGIN_URL, data)
//获取用户信息
export const reqUserInfo = () => request.get<any, any>(API.USERINFO_URL)
//退出登录
export const reqLogout = () => request.post<any, any>(API.LOGOUT_URL)






// import type {
//   loginFormData,
//   userInfoReponseData,
//   loginResponseData,
// } from './type'
// //项目用户相关的请求地址
// enum API {
//   LOGIN_URL = 'user/login',
//   USERINFO_URL = '/user/info',
// }

// //登录接口方法
// export const reqLogin = (data: loginFormData) =>
//   request.post<loginResponseData>(API.LOGIN_URL, data)

// //获取用户信息
// export const reqUserInfo = () =>
//   request.get<userInfoReponseData>(API.USERINFO_URL)
